<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$setting=$return['pluginset'];
if($_RQ['op']=='main'){
		$pid=$_RQ['pid'];
		$return['params']=array();
		if($_RQ['pid']){
			$return['pid']=$_RQ['pid'];
		}else{
			$return['pid']='ishot';
		}
		$parentid=$return['pid'];
		if($setting['is_level3']){
			$return['islevel3']=true;
		}
		$groupspram=array('uniacid'=>$_SESSION['uniacid'],'status'=>'1','pid'=>0);
		$category=pdo_getall('jy_51job_job_group',$groupspram,array(),'','paixu desc');
		foreach($category as &$ov){
				$ov['childs']=pdo_getall('jy_51job_job_group',array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'pid'=>$ov['id']),array(),'','paixu desc');
				if($setting['is_level3']){
					foreach($ov['childs'] as &$v3){
						$v3['childs']=pdo_getall('jy_51job_job_group',array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'pid'=>$v3['id']),array(),'','paixu desc');
					}
				}
		}
		$return['category']=$category;
		$return['ishot']=pdo_getall('jy_51job_job_group',array('uniacid'=>$_SESSION['uniacid'],'status'=>'1','ishot'=>1),array(),'','paixu desc');
		if($return['pid']=='ishot'){
			$return['nowgroups']=$return['ishot'];
		}else{
			$return['nowgroups']=$category[0];
		}
		$return['params']=array('keyword'=>'','cid'=>0,'pid'=>$parentid);
		$return['sharedata']=array(
			'title'=>'职位分类',
			'desc'=>$setting['title'].'职位分类',
			'link'=>custom_url('jy_51job/groups//pid='.$parentid.'&fromuser='.$_SESSION['uid'],true),
			'imgUrl'=>tomedia($setting['share_image']),
		);
		set_html('title','职位分类');
		exi($return);
}
?>